<!DOCTYPE html>
<html>
<head>
	<title>「同性交友聊天室」</title>
	<link rel='stylesheet' href='/stylesheets/style.css' />
	<script src="/javascripts/socket.io.js"></script>
	<link rel="shortcut icon" href="/images/icon_聊天.png" />
	<meta charset="utf-8">
</head>
<body>
<div id="message_board">
	<form method='post' action='' id= 'form'>
		<label for="form-id">发帖人ID：</label>
		<input id="form-id" type="textfield" name="name" maxlength="20" value= "<%= ip %>">
		<textarea rows="6" id="form-textarea" name="post" ></textarea>
		<p id="dynamicBar">还可以输入<span id="num">20</span>字</p>
		<input id="form-submit" type="submit" name="submit" value="发布">
	</form>
	<p id="weibo">微博</p>
	<hr color="red">

		<div id='all-messages'>
		  <% for(var i = 0; i <= 5; i++){ %>
		  <div class='message'>
		    <img class='head_portrait' src='/images/头像.png'>
		    <div class='message-info'>
		      <p class='message-id'><%= posts[i].name %></p>
		      <p class='message-detail'><%= posts[i].post %></p>
		      <time><%= posts[i].time.minute %></time>
					<p class ='message-repeat' ><a href='#form-id'>回复</a></p>
		    </div>
		  </div>
		  <hr class='messages_divider'>
		  <% }  %>
		</div>

</div>
<script type="text/javascript" src="/javascripts/script.js"></script>
</body>
</html>
